<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/3.2.40/vue.global.js"></script>
</head>
<body>
    <template id="msg">
        <div>
            <h1>你啊{{name}}</h1>
        </div>
    </template>
    <div id="app">
        <!-- <hellow/> -->
        <msga/>
    </div>
</body>
</html>
<script>
    const app = Vue.createApp({
        data(){
            return{
                name:'ming',
                lastname:'hong'
            }
        }
    })
    // app.component(
    //     'hellow',
    //     {
    //         template:'<h1>年后</h1>'
    //     }
    // )
    //全局组件
    app.component(
        'msga',
        {
            template:'#msg',
            data(){
                return{
                    name:'ming'
                }
            }
        }
    )

    app.mount('#app')
</script>